<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>底部导航</title>
 <!--   <link rel="stylesheet" type="text/css" href="./css/api.css"/>

    <link rel="stylesheet" type="text/css" href="./css/iconfont.css"> -->

    <link rel="stylesheet" type="text/css" href="./css/aui.css"/>

    <style>
		html,body {height:100%;background-color:#fff; }
		.hover{ opacity: .8; }

		.flex-wrap{ display: -webkit-box;	display: -webkit-flex;	display: flex; }
		.flex-con{     -webkit-box-flex: 1;     -webkit-flex: 1;    flex: 1; font-size:12px;color: #543e3e;}
		.flex-vertical{ -webkit-box-orient: vertical;-webkit-flex-flow: column;flex-flow: column;}

		#wrap{ height: 100%;}

      header{ background: linear-gradient(to right,#f370af 0,#5515ee 100%); }
       /*   header{ background: #000; }     */
        header ul li { height: 44px; line-height: 44px; text-align: center; display: none; color: #fff; position: relative;font-size: 0.9rem;  }
        header ul li.active{ display: block; }
        #footer{
		/*	background-color: #ffffff;
			border-radius: 30px 30px 0px 0px;    */
			box-shadow: 0px -1px 20px 0px rgba(0, 0, 0, 0.1);
			    z-index: 9999;
		}
        #footer ul li{
			height: 55px;
			padding-top: 1.25rem;
			padding-bottom: 1px;
			background: url() no-repeat center 2px;
			font-size: 0.6rem;
			background-size: auto 1.1rem;
			text-align: center;

			}
        #footer ul li.active{

			color: #ff3b5b;

			/*

			background-image: -webkit-gradient(linear,left top,right top,from(#1e90ff),to(#1e90ff));
			background-image: -webkit-linear-gradient(left,#1e90ff,#1e90ff);
			background-image: -moz-linear-gradient(left,#1e90ff,#1e90ff);
			background-image: linear-gradient(to right,#f370af 0,#5515ee 100%);
			*/

			background-color: #f7f7f7;


		}
        #footer ul li:nth-child(1){ background-image: url(); }
        #footer ul li:nth-child(2){ background-image: url(); }
        #footer ul li:nth-child(3){ background-image: url(); }
        #footer ul li:nth-child(4){ background-image: url(); }
        #footer ul li:nth-child(1).active{ background-image: url(); }
	      #footer ul li:nth-child(2).active{ background-image: url(); }
        #footer ul li:nth-child(3).active{ background-image: url(); }
        #footer ul li:nth-child(4).active{ background-image: url(); }
        .flex-con{
          overflow: auto;
          background-color:#fff;
        }
    </style>
    <script type="text/javascript">
      localStorage.setItem('api_url',"http://juzhongyingshi.wuguq.cn");
    </script>
</head>
<body>



<div id="wrap" class="flex-wrap flex-vertical">
    <header>
        <ul>
            <li class="border-a active" >

			<img src="" style="position: absolute;width: 1rem;top: 0.6rem;left: 0.5rem; z-index:100 " onclick="toHelp()">


			<span style="/*height: 44px; */position: relative; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;    top: 0.5rem;" >

                <div style="margin-left: 15%; width: 100%;    margin-right: 25%;"   onClick="sousuoDianji()" >
                    <div style="width: 100%; background-color: rgba(255,255,255,0.8); border-radius: 20px;">
                        <input readonly="readonly"  style="text-align: center; font-size: 0.5rem; color: #fff; background: none; border: none; width: 100%; padding: 0.5rem 0;" type="text" placeholder="懒得找 搜一下">
                    </div>
                </div>

            </span>


			<span  id ="Index_right_list">

						<!--首页两列广告 --->
						<script type="text/x-dot-template" id="Index_right_template">

							{{~ it.msg : value : index }}
									<a tapmode onclick="toBanner('{{= value. linkurl }}')" >

											<img src="http://juzhongyingshi.wuguq.cn/{{= value. picurl }}"  style="position: absolute;width: 1.5rem;top: 0.2rem;right: 2.5rem;" >

									</a>
							{{~}}

						</script>

		</span>










			<img src="" style="position: absolute;width: 1rem;top: 0.6rem;right: 0.5rem;" onclick="toShezhi()">
			</li>

            <li class="border-b" >
			<img src="" style="position: absolute;width: 1rem;top: 0.6rem;left: 0.5rem; z-index:100 " onclick="toHelp()">


			<span style="/*height: 44px; */position: relative; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;    top: 0.5rem;" >

                <div style="margin-left: 15%; width: 100%;    margin-right: 25%;"   onClick="sousuoDianji()" >
                    <div style="width: 100%; background-color: rgba(255,255,255,0.8); border-radius: 20px;">
                        <input readonly="readonly"  style="text-align: center; font-size: 0.5rem; color: #fff; background: none; border: none; width: 100%; padding: 0.5rem 0;" type="text" placeholder="懒得找 搜一下">
                    </div>
                </div>

            </span>


			<span  id ="Index_right_list">

						<!--首页两列广告 --->
						<script type="text/x-dot-template" id="Index_right_template">

							{{~ it.msg : value : index }}
									<a tapmode onclick="toBanner('{{= value. linkurl }}')" >

											<img src="http://juzhongyingshi.wuguq.cn/{{= value. picurl }}"  style="position: absolute;width: 1.5rem;top: 0.2rem;right: 2.5rem;" >

									</a>
							{{~}}

						</script>

		</span>










			<img src="" style="position: absolute;width: 1rem;top: 0.6rem;right: 0.5rem;" onclick="toShezhi()">

			</li>
            <li class="border-b" > <img src="" style="position: absolute;width: 1rem;top: 0.6rem;left: 0.5rem;" onclick="toHelp()">   推荐  <img src="" style="position: absolute;width: 1rem;top: 0.6rem;right: 0.5rem;" onclick="toShezhi()"> </li>
            <li class="border-b" > <img src="" style="position: absolute;width: 1rem;top: 0.6rem;left: 0.5rem;" onclick="toHelp()">   会员中心       <img src="" style="position: absolute;width: 1rem;top: 0.6rem;right: 2.5rem;" onClick="upvip()">    <img src="" style="position: absolute;width: 1rem;top: 0.6rem;right: 0.5rem;" onclick="toShezhi()"> </li>
        </ul>
    </header>





    <div id="main" class="flex-con">    </div>





	 <div id="footer" class="border-t">
        <ul class="flex-wrap"  style="font-weight:bold">
            <li tapmode="hover" onclick="randomSwitchBtn( this );" class="flex-con active" >首页</li>
            <li tapmode="hover" onclick="randomSwitchBtn( this );" class="flex-con" >发现</li>
            <li tapmode="hover" onclick="randomSwitchBtn( this );" class="flex-con" >推荐</li>
            <li tapmode="hover" onclick="randomSwitchBtn( this );" class="flex-con" >我的</li>
        </ul>
    </div>




</div>


</body>
</html>
<script type="text/javascript" charset="utf-8"src="js/hui.js"></script>
<script type="text/javascript" src="script/api.js"></script>
<script type="text/javascript" src="script/doT.js"></script>
<script type="text/javascript">
    var api_url = localStorage.getItem('api_url');
    var uid  =  0;
 	var launchImageModule = null;    //启动页广告
    apiready = function () {

      get_Invitation_mode();  // 邀请工作模式

      //          localStorage.setItem('launchImage',$api.getStorage('launchImage'));   // 启动页图片地址
      //          localStorage.setItem('launchImageAd',$api.getStorage('launchImageAd'));   // 启动页图片地址

  //      launchImageModule = api.require('launchImage');
  //   var launchImage = $api.getStorage('launchImage');		// 启动图
  //   var launchImageAd = $api.getStorage('launchImageAd');	// 读取本地启动广告图
      var launchImage = localStorage.getItem('launchImage') ;		// 启动图
      var launchImageAd = localStorage.getItem('launchImageAd');	// 读取本地启动广告图
      console.log(launchImage);
      console.log(launchImageAd);
      console.log(typeof(launchImageAd));


    //  alert( JSON.stringify( launchImageModule ) );

      //    localStorage.setItem('launchImageAd123',$api.getStorage('launchImageAd'));   // 启动页图片地址
      //    localStorage.setItem('launchImageAd456',$api.getStorage('launchImage'));   // 启动页图片地址

  //         alert( localStorage.getItem('launchImageAd')  );



      if(typeof(launchImage) != 'undefined' && typeof(launchImageAd) != 'undefined'){


        api.openFrame({
            name: 'launchImageAd',
            url: './html/launchImageAd.html',
            bounces: false,
            rect: {
            x:0,
            y:0,
            w:'auto',
            h:'auto'
            }
        });


      }else{
//  api.showLaunchView();

      }

      // 延迟获取广告图
  setTimeout(function(){

    var launchImageAdurl = localStorage.getItem('launchImageAd');
	var launchImageurl = localStorage.getItem('api_url')+'/launchImage.png';

    getlaunchImageAd( launchImageAdurl );

    getlaunchImage( launchImageurl );

                    api.removeLaunchView({
                            animation:{
                                    type:'fade',
                                    duration:300,      //这个duration为3s看不到效果
                            }
                    });


  },1000);









//休眠
api.setKeepScreenOn({
    keepOn: true
});

        $api.fixStatusBar( $api.dom('header') );


        api.setStatusBarStyle({
            style: 'dark',
            color: 'rgba(0,0,0,0)'
        });


        if (localStorage.getItem('user_id')>1) {
          uid = localStorage.getItem('user_id');
        }else {
          uid = 0;
        }




                    //监听重新获取
              			api.addEventListener({
              				name: 'Ryanindex'
              			}, function(ret, err) {
              				if(ret) {
              					funIniGroup();
              				}
              			});

//    funIniGroup();
		getIndex_right();   //右上角图标
		setTimeout("checkUpdate()",3000);  //延迟执行 更新检测

		// 网络状态
		api.addEventListener({
			name:'offline'
		}, function(ret, err){

			api.toast({
			msg : '网络连接异常',
			duration : 5000,
			location : 'middle'
			});



		});

		api.addEventListener({
			name:'online'
		}, function(ret, err){

			  api.toast({
			  msg : '已经连接网络',
			  duration : 2000,
			  location : 'middle'
			  });



    funIniGroup();
		getIndex_right();   //右上角图标
		get_Invitation_mode();  // 邀请工作模式
		setTimeout("checkUpdate()",3000);  //延迟执行 更新检测


		});










        var user_id = localStorage.getItem('user_id');
        if (user_id>1) {

          api.ajax({
              url: api_url+'/login/login/imei.html',
              method: 'get',
              data: {
                  values: {
                      uid: user_id
                  }
              }
          },function(ret, err){
              if (ret) {

                  if (ret.msg.imei!=api.deviceId) {
                    localStorage.setItem('user_id','');
                    localStorage.setItem('user_name','');
                    localStorage.setItem('user_time','');
                    api.sendEvent({
                      name: 'newLoingdata',
                      extra: {
                      }
                    });

                    api.alert({
                        title: '登陆信息已过期',
                        msg: '请重新登陆',
                    });

                  }
              } else {

              }
          });
        }



		$api.fixStatusBar( $api.byId('header') );





																		var backSecond = 0;

api.addEventListener({
    name: 'keyback'
}, function(ret, err) {
  if(window.isExit){
    api.closeWidget({
      id: 'A6030930643102',    //在项目根目录 config.xml 的 <widget> 标记 的 id 属性
      silent : true
    });
  }else {
    api.toast({
        msg: '按主菜单退出应用',
        duration: 1000,
        location: 'bottom'
    });

    window.isExit=true;
    setTimeout(function(){
      window.isExit=false;
    },1000);
  }
});





    }







    function funIniGroup(){


        var eHeaderLis = $api.domAll('header li'),
            frames = [];


			/*   循环方法
        for (var i = 0,len = eHeaderLis.length; i < len; i++) {

            frames.push( {
                name: 'frame'+i,
                url: './html/frame'+i+'.html',
                bgColor : '#f5f5f5',
                bounces:false       //  这里  false  禁止下拉    true 可以下拉

            } )

        }
		*/



		/* 循环方法2
		  for (var i = 0,len = eHeaderLis.length; i < len; i++) {
            if(i==0)
            {
               frames.push({
                name: 'h5',
                url: './html/h5.html',
                bgColor : '#f5f5f5',
                bounces:true
               })
            }
            else
            {
                frames.push({
                name: 'frame'+i,
                url: './html/frame'+i+'.html',
                bgColor : '#f5f5f5',
                bounces:true
               })
            }


        }

		*/


					//指定

					frames[0]={
                            name: 'frame0',
                            url: './html/frame1.html',
                            bgColor : 'rgba(255,255,255,0)',
                            bounces:false
                        };
                    frames[1]={
                            name: 'frame1',
                            url: './html/frame0.html',
                            bgColor : 'rgba(255,255,255,0)',
                            bounces:false
                    };
                    frames[2]={
							name: 'frame2',
                            url: './html/frame2.html',
                            bgColor : 'rgba(255,255,255,0)',
                            bounces:false
                    };
                    frames[3]={
                            name: 'frame3',
                            url: './html/frame3.html',
                            bgColor : 'rgba(255,255,255,0)',
                            bounces:true
                          };





        api.openFrameGroup({
            name: 'group',
            scrollEnabled: false,        //  这里  false  禁止左右滑动    true 可以


         //   preload : 0,  //数据加载未完成时，加载动画
            rect: {
                x: 0,
                y: $api.dom('header').offsetHeight,
                w: api.winWidth,
                h: $api.dom('#main').offsetHeight
            },
            index: 0,
            frames: frames
        }, function (ret, err) {
            if (ret) {
                api.sendEvent({
                    name: 'indexChangeEvent',
                    extra: {
                        id: ret.index
                    }
                });
            }
        });






    }




    // 获取广告图
       function getlaunchImageAd( url ){
   		api.imageCache({
   		    url: url,
   		    thumbnail: false,
   		},function(ret,err){
   		    if (ret) {
   		    	//api.alert({msg: "广告获取成功，下次启动将会显示！"});
/*   			api.toast({
   				    msg: '调试：启动图获取成功！缓存完毕！',
   				    duration:2000,
   				    location: 'middle'
   				});
*/
   		        var path = ret.url;
   		        $api.setStorage('launchImageAd_Cache', path);
   		    }
   		});
       }

    // 获取广告图
       function getlaunchImage( url ){
   		api.imageCache({
   		    url: url,
   		    thumbnail: false,
   		},function(ret,err){
   		    if (ret) {
   		    	//api.alert({msg: "广告获取成功，下次启动将会显示！"});
/*   			api.toast({
   				    msg: '调试：启动图获取成功！缓存完毕！',
   				    duration:2000,
   				    location: 'middle'
   				});
*/
   		        var path = ret.url;
   		        $api.setStorage('launchImage_Cache', path);
   		    }
   		});
       }



/*
      function getlaunchImage(){
   		launchImageModule.get({
   		    debug: true,
   		    isPortrait: true
   		}, function(ret, err){
   		    if(ret.status){
   				//api.alert({msg: ret.src});
   				var path = ret.src;
   				$api.setStorage('launchImage', path);
   		}else{
   				api.alert({msg: err.msg});
   		    }
   		});
       }

*/








  function toBanner(url){

    if (url == '') {

	//如果后台填写的跳转链接为空 则无任何操作

    }else{


	/*
				var str = url ;

				if(str.indexOf("widget://")>-1){   //如果包含 widget://  则执行内部页面跳转


								var str = url;
								var Internal_jump = str.split("widget://html/").join("");
								console.log(Internal_jump);    // 剔除 widget://html/ 后把结果给 Internal_jump


					　　		api.openWin({
								name: 'Internal_jump',
								url: Internal_jump
								});

*/

/*

设置中心  widget://html/shezhi_win.html
我的佣金  widget://html/yongjin_win.html
佣金明细  widget://html/yongjinlog_win.html
私人视频  widget://html/video_secret_win.html
升级会员  widget://html/upgrade_vip_win.html
直播专题  widget://html/tv_special_win.html
我的团队  widget://html/tuandui_win.html
提现记录  widget://html/tixianlog_win.html
邀请好友  widget://html/share_win.html
搜索页面  widget://html/search_win.html
观看记录  widget://html/look_record_win.html
我的积分  widget://html/jifen_win.html
帮助中心  widget://html/help_win.html
我的激活码  widget://html/gokalog_win.html
游戏直播间  widget://html/game_zhubo_list_win.html
公告列表  widget://html/artical_win.html
专属客服  widget://html/setup/customer_service_win.html




*/

				if(url == '设置中心'){

					api.openWin({
						name: 'shezhi_win',
						url: 'widget://html/shezhi_win.html',
						delay: 300
					});

				}else if(url == '我的佣金'){

					api.openWin({
						name: 'yongjin_win',
						url: 'widget://html/yongjin_win.html',
						delay: 300
					});
				}else if(url == '佣金明细'){

					api.openWin({
						name: 'yongjinlog_win',
						url: 'widget://html/yongjinlog_win.html',
						delay: 300
					});
				}else if(url == '私人视频'){

					api.openWin({
						name: 'video_secret_win',
						url: 'widget://html/video_secret_win.html',
						delay: 300
					});
				}else if(url == '升级会员'){

					api.openWin({
						name: 'upgrade_vip_win',
						url: 'widget://html/upgrade_vip_win.html',
						delay: 300
					});
				}else if(url == '直播专题'){

					api.openWin({
						name: 'tv_special_win',
						url: 'widget://html/tv_special_win.html',
						delay: 300
					});
				}else if(url == '我的团队'){

					api.openWin({
						name: 'tuandui_win',
						url: 'widget://html/tuandui_win.html',
						delay: 300
					});
				}else if(url == '提现记录'){

					api.openWin({
						name: 'tixianlog_win',
						url: 'widget://html/tixianlog_win.html',
						delay: 300
					});
				}else if(url == '邀请好友'){

					api.openWin({
						name: 'share_win',
						url: 'widget://html/share_win.html',
						delay: 300
					});
				}else if(url == '搜索页面'){

					api.openWin({
						name: 'search_win',
						url: 'widget://html/search_win.html',
						delay: 300
					});
				}else if(url == '观看记录'){

					api.openWin({
						name: 'look_record_win',
						url: 'widget://html/look_record_win.html',
						delay: 300
					});
				}else if(url == '我的积分'){

					api.openWin({
						name: 'jifen_win',
						url: 'widget://html/jifen_win.html',
						delay: 300
					});
				}else if(url == '帮助中心'){

					api.openWin({
						name: 'help_win',
						url: 'widget://html/help_win.html',
						delay: 300
					});
				}else if(url == '我的激活码'){

					api.openWin({
						name: 'gokalog_win',
						url: 'widget://html/gokalog_win.html',
						delay: 300
					});
				}else if(url == '游戏直播间'){

					api.openWin({
						name: 'game_zhubo_list_win',
						url: 'widget://html/game_zhubo_list_win.html',
						delay: 300
					});
				}else if(url == '公告列表'){

					api.openWin({
						name: 'artical_win',
						url: 'widget://html/artical_win.html',
						delay: 300
					});
				}else if(url == '专属客服'){

					api.openWin({
						name: 'customer_service_win',
						url: 'widget://html/setup/customer_service_win.html',
						delay: 300
					});


				}else{       // 否则执行正常H5页面跳转

							//	api.toast({
							//	msg: url
							//	});



			                api.openWin({
                            name: 'h5',
                            url: './html/h5.html',
                            pageParam: {
                                 url: url
								}
                             });


				}



	}
  }





/*
		//////////////////////    首页右上角  方法  Index_right  S  //////////////////////
		function Index_right() {

			var Index_right_list = $api.byId('Index_right_list');
			var Index_right_template = $api.byId('Index_right_template');
			api.ajax({
				url: api_url+'/login/login/index_right.html',
				method: 'get',
				data: {
                  values: {
			key: 'qq166098756',   //安全码
                  }
              }
			}, function(ret, err) {
				if(ret) {
					//alert( JSON.stringify( ret ) );
					var pagefn = doT.template(Index_right_template.text);
					Index_right_list.innerHTML = pagefn(ret);
					api.hideProgress();

				} else {
					api.hideProgress();
					//alert( JSON.stringify( err ) );
				}
			});
		}

		//////////////////////    首页右上角  方法  Index_right  E  //////////////////////
*/





			//////////////////////    全网影视图标获取  方法  getMovies  S  //////////////////////
		function getIndex_right() {

			var Index_right_list = $api.byId('Index_right_list');
			var Index_right_template = $api.byId('Index_right_template');

			api.ajax({
				url: api_url+'/login/login/Index_right.html',    // 调用数量限制
				method: 'get',
				data: {
                  values: {
			key: 'qq166098756',   //安全码
                  }
              }
			}, function(ret, err) {
				if(ret) {
					//alert( JSON.stringify( ret ) );
					var pagefn = doT.template(Index_right_template.text);
					Index_right_list.innerHTML = pagefn(ret);
					api.hideProgress();

				} else {
					api.hideProgress();
					//alert( JSON.stringify( err ) );
				}
			});
		}

		//////////////////////    全网影视图标获取  方法  getMovies  E  //////////////////////






    function toHelp(){


						api.openWin({
						name: 'help_win',
						url: './html/help_win.html',
				//	delay: 300,


				bounces: false,
				slidBackEnabled: true,
				bgColor: '#fff',
				animation: {
					type: "fade", //动画类型（详见动画类型常量）
					subType: "from_top", //动画子类型（详见动画子类型常量）
				//	duration: 400
				},
				vScrollBarEnabled: false



				});

    }









    // 随意切换按钮
    function randomSwitchBtn( tag ) {
        if( tag == $api.dom('#footer li.active') )return;
        var eFootLis = $api.domAll('#footer li'),
            eHeaderLis = $api.domAll('header li'),
            index = 0;


        for (var i = 0,len = eFootLis.length; i < len; i++) {
            if( tag == eFootLis[i] ){
                index = i;
            }else{
                $api.removeCls(eFootLis[i], 'active');
                $api.removeCls(eHeaderLis[i], 'active');
            }
        }
        $api.addCls( eFootLis[index], 'active');
        $api.addCls( eHeaderLis[index], 'active');
        api.setFrameGroupIndex({
            name: 'group',
            index: index

        });


    }






		/////////////搜索框点击 方法  sousuodianji   S   ////////////
		function sousuoDianji() {

			/*		api.openWin({
						name: 'search_win',
						url: 'search_win.html'
					});

							*/

				api.openWin({
						name: 'search_win',
						url: './html/search_win.html',
			//		delay: 300,


				bounces: false,
				slidBackEnabled: true,
				bgColor: '#fff',
				animation: {
					type: "fade", //动画类型（详见动画类型常量）
					subType: "from_bottom", //动画子类型（详见动画子类型常量）
				//	duration: 400
				},
				vScrollBarEnabled: false



				});






		}
		/////////////搜索框点击 方法  sousuodianji   E   ////////////










/////////////搜索框点击 方法  SetupDianji   S   ////////////
		function toShezhi() {

			//如果判断没有登录 就提示  并跳转到登录页面
			if(localStorage.getItem('user_id') < 1) {

	/*			api.toast({
					msg: '  你还没登陆！',
					duration: 2000
				});
*/

					api.openWin({
						name: 'login',
						url: './html/login.html',
						delay: 300,


				bounces: false,
				delay: delay,
				slidBackEnabled: true,
				bgColor: '#fff',
				animation: {
					type: "reveal", //动画类型（详见动画类型常量）
					subType: "from_bottom", //动画子类型（详见动画子类型常量）
					duration: 400
				},
				vScrollBarEnabled: false

					});
				return;
			}
			//↑↑↑↑↑↑↑上面LEEi   新加


					var delay = 0;
					if(api.systemType != 'ios') {
						delay = 300;
					}


					api.openWin({
						name: 'shezhi_win',
						url: './html/shezhi_win.html',
						bounces: false,
						delay: delay,
						slidBackEnabled: true,
						vScrollBarEnabled: false
					});



		}
/////////////搜索框点击 方法  SetupDianji   E   ////////////







/////////////会员升级 方法  upvip   S   ////////////
		function upvip() {

			//如果判断没有登录 就提示  并跳转到登录页面
			if(localStorage.getItem('user_id') < 1) {

	/*			api.toast({
					msg: '  你还没登陆！',
					duration: 2000
				});
*/

					api.openWin({
						name: 'login',
						url: './html/login.html',
						delay: 300,


				bounces: false,
				delay: delay,
				slidBackEnabled: true,
				bgColor: '#fff',
				animation: {
					type: "reveal", //动画类型（详见动画类型常量）
					subType: "from_bottom", //动画子类型（详见动画子类型常量）
					duration: 400
				},
				vScrollBarEnabled: false

					});
				return;
			}
			//↑↑↑↑↑↑↑上面LEEi   新加


					var delay = 0;
					if(api.systemType != 'ios') {
						delay = 300;
					}


					api.openWin({
						name: 'upgrade_vip_win',
						url: 'widget://html/upgrade_vip_win.html',
						bounces: false,
						delay: delay,
						slidBackEnabled: true,
						vScrollBarEnabled: false
					});



		}
/////////////会员升级 方法  upvip   E   ////////////




/////////////邀请工作模式 方法  get_Invitation_mode   S   ////////////
function get_Invitation_mode(){


			api.ajax({
				url: api_url+'/login/login/get_Invitation_mode.html',
				method: 'get',
				data: {
                  values: {
			key: 'qq166098756',   //安全码
                  }
              }
			}, function(ret, err) {
				if(ret) {
			// 		alert( JSON.stringify( ret ) );


				//	var Invitation_mode123 = ret.msg['Invitation_mode'];

					//获取数据 写入本地存储
					localStorage.setItem('Invitation_mode',ret.msg['Invitation_mode']);   //邀请工作模式
					localStorage.setItem('app_working_mode',ret.msg['app_working_mode']);   //APP 工作模式
					localStorage.setItem('vip_movies_theme',ret.msg['vip_movies_theme']);   //VIP 影视主题
					localStorage.setItem('apicloud_app_id',ret.msg['apicloud_app_id']);   //APP_ID 用户按二次退出
					localStorage.setItem('app_android_apk_down',ret.msg['app_android_apk_down']);   //安卓APK 地址
					localStorage.setItem('app_ios_down',ret.msg['app_ios_down']);   //苹果更新地址
					localStorage.setItem('imgapi_Token',ret.msg['imgapi_Token']);   //贴图库 Token
					localStorage.setItem('Picture_upload_API',ret.msg['Picture_upload_API']);   //图片上传API
					localStorage.setItem('tencent_x5',ret.msg['tencent_x5']);   //腾讯X5
					localStorage.setItem('Android_Updated_version',ret.msg['Android_Updated_version']);   //安卓更新版本号
					localStorage.setItem('Android_Updated_content',ret.msg['Android_Updated_content']);   //安卓更新介绍
					localStorage.setItem('Ios_Updated_version',ret.msg['Ios_Updated_version']);   //IOS更新版本号
					localStorage.setItem('Ios_Updated_content',ret.msg['Ios_Updated_content']);   //IOS更新介绍
					localStorage.setItem('Android_Updated_switch',ret.msg['Android_Updated_switch']);   //Android更新控制
					localStorage.setItem('Ios_Updated_switch',ret.msg['Ios_Updated_switch']);   //IOS更新控制
					localStorage.setItem('Vip_Voice_cues',ret.msg['Vip_Voice_cues']);   //VIP过期语音提示
					localStorage.setItem('Is_Quick_login',ret.msg['Is_Quick_login']);   //快捷登录按钮开放
					localStorage.setItem('vip_movies_theme_top',ret.msg['vip_movies_theme_top']);   // 影视VIP区域 头部图片
					localStorage.setItem('vip_movies_theme_foot',ret.msg['vip_movies_theme_foot']);   // 影视VIP区域 底部图片
					localStorage.setItem('app_Invitation_slogans',ret.msg['app_Invitation_slogans']);   // APP分享 邀请广告词
					localStorage.setItem('share_Poster_template',ret.msg['share_Poster_template']);   // APP分享 海报模板
					localStorage.setItem('app_secret_key',ret.msg['app_secret_key']);   // APP搜索框指定值
					localStorage.setItem('Hot_search',ret.msg['Hot_search']);   // 搜索推荐词
					localStorage.setItem('Load_animation',ret.msg['Load_animation']);   // 加载动画
					localStorage.setItem('player_bottom_show',ret.msg['player_bottom_show']);   // 播放器底部展示
					localStorage.setItem('frame_two_show',ret.msg['frame_two_show']);   // frame2 推荐页展示


					localStorage.setItem('Hot_Video_num',ret.msg['Hot_Video_num']);    // 推荐影视数量
					localStorage.setItem('Private_Video_num',ret.msg['Private_Video_num']);   //私人影视数量
					localStorage.setItem('Special_Live_num',ret.msg['Special_Live_num']);   // 专题直播数量
					localStorage.setItem('Tv_Live_num',ret.msg['Tv_Live_num']);   // TV直播数量


					localStorage.setItem('Analytical_type',ret.msg['Analytical_type']);   // 解析播放类型
					localStorage.setItem('baores_uid',ret.msg['baores_uid']);   // baores_uid
					localStorage.setItem('baores_token',ret.msg['baores_token']);   //  baores_token
					localStorage.setItem('Player_selection',ret.msg['Player_selection']);   // 本地播放器选择
					localStorage.setItem('Mandatory_Invitation_Code',ret.msg['Mandatory_Invitation_Code']);   // 是否强制邀请码
					localStorage.setItem('Invitation_Code_Show',ret.msg['Invitation_Code_Show']);   // 邀请码输入框是否显示
					localStorage.setItem('Invitation_Code_Distinguish',ret.msg['Invitation_Code_Distinguish']);   // 邀请码是否自动识别
					localStorage.setItem('register_switch',ret.msg['register_switch']);   // 注册开关

          localStorage.setItem('launchImageAd',ret.msg['launchImageAd']);   // 启动页图片地址
          localStorage.setItem('launchImageAd_url',ret.msg['launchImageAd_url']);   // 启动页广告地址
          localStorage.setItem('launchImageAd_time',ret.msg['launchImageAd_time']);   // 启动页显示时间
          localStorage.setItem('launchImageAd_skip',ret.msg['launchImageAd_skip']);   // 启动页是否允许跳过

          localStorage.setItem('System_Return_Key_Binding',ret.msg['System_Return_Key_Binding']);   // 特权影视页 返回是否绑定系统返回键



					localStorage.setItem('Movies_Category_List_Switch',ret.msg['Movies_Category_List_Switch']);   // 分类页 影视类型 展示
					localStorage.setItem('mn_xz_power',ret.msg['mn_xz_power']);   // 分类页 写真 伦理 播放权限

//					localStorage.setItem('Movies_Category_action_List_Switch',ret.msg['Movies_Category_action_List_Switch']);   // 分类 动作 开关
//					localStorage.setItem('Movies_Category_comedy_List_Switch',ret.msg['Movies_Category_comedy_List_Switch']);   // 分类 喜剧 开关
//					localStorage.setItem('Movies_Category_plot_List_Switch',ret.msg['Movies_Category_plot_List_Switch']);   // 分类 剧情 开关
//					localStorage.setItem('Movies_Category_love_List_Switch',ret.msg['Movies_Category_love_List_Switch']);   // 分类 爱情 开关
//					localStorage.setItem('Movies_Category_documentary_List_Switch',ret.msg['Movies_Category_documentary_List_Switch']);   // 分类 纪录 开关
//					localStorage.setItem('Movies_Category_science_List_Switch',ret.msg['Movies_Category_science_List_Switch']);   // 分类 科幻 开关
//					localStorage.setItem('Movies_Category_warfare_List_Switch',ret.msg['Movies_Category_warfare_List_Switch']);   // 分类 战争 开关
//					localStorage.setItem('Movies_Category_terror_List_Switch',ret.msg['Movies_Category_terror_List_Switch']);   // 分类 惊悚 开关
//					localStorage.setItem('Movies_Category_mn_List_Switch',ret.msg['Movies_Category_mn_List_Switch']);   // 分类 伦理 开关
//					localStorage.setItem('Movies_Category_xz_List_Switch',ret.msg['Movies_Category_xz_List_Switch']);   // 分类 写真 开关

//					localStorage.setItem('Movies_Category_action_List_Custom',ret.msg['Movies_Category_action_List_Custom']);   // 分类 动作 自定义
//					localStorage.setItem('Movies_Category_comedy_List_Custom',ret.msg['Movies_Category_comedy_List_Custom']);   // 分类 喜剧 自定义
//					localStorage.setItem('Movies_Category_plot_List_Custom',ret.msg['Movies_Category_plot_List_Custom']);   // 分类 剧情 自定义
//					localStorage.setItem('Movies_Category_love_List_Custom',ret.msg['Movies_Category_love_List_Custom']);   // 分类 爱情 自定义
//					localStorage.setItem('Movies_Category_documentary_List_Custom',ret.msg['Movies_Category_documentary_List_Custom']);   // 分类 纪录 自定义
//					localStorage.setItem('Movies_Category_science_List_Custom',ret.msg['Movies_Category_science_List_Custom']);   // 分类 科幻 自定义
//					localStorage.setItem('Movies_Category_warfare_List_Custom',ret.msg['Movies_Category_warfare_List_Custom']);   // 分类 战争 自定义
//					localStorage.setItem('Movies_Category_terror_List_Custom',ret.msg['Movies_Category_terror_List_Custom']);   // 分类 惊悚 自定义





       //   alert(localStorage.getItem('Invitation_mode'));


					api.hideProgress();

				} else {
					api.hideProgress();
					//alert( JSON.stringify( err ) );
				}
			});



}

/////////////邀请工作模式 方法  get_Invitation_mode   E   ////////////




/*

/////////////更新app 方法  checkUpdate   E  （在apicloud进行）  ////////////
//APICLOUD
  function checkUpdate() {


var mam = api.require('mam');
mam.checkUpdate(function(ret, err) {
if (ret) {
  var result = ret.result;
  if (result.update == true && result.closed == false) {



  				api.openWin({
				name: 'app_upgrade',
				url: 'widget://html/setup/app_upgrade.html',
				//	delay: 300,


				bounces: false,
				slidBackEnabled: true,
				bgColor: '#fff',
				animation: {
					type: "fade", //动画类型（详见动画类型常量）
					subType: "from_top", //动画子类型（详见动画子类型常量）
				//	duration: 400
				},
				vScrollBarEnabled: false


				});

  }


}
});
}


/////////////更新app 方法  checkUpdate   E   ////////////
*/



/////////////更新app 方法  checkUpdate   E  （在apicloud进行）  ////////////
//Ryan
  function checkUpdate() {




		//var appVersion = api.appVersion; // 比如： 1.0.0
	//	  alert( api.appVersion);
	//	  alert( localStorage.getItem('Android_Updated_version')  );

			if(api.systemType == 'ios'){

				var app_new_Version = localStorage.getItem('Ios_Updated_version')
				var app_new_Version_content = localStorage.getItem('Ios_Updated_content')
				var app_new_Version_url = localStorage.getItem('app_ios_down')
				var app_new_Version_switch = localStorage.getItem('Ios_Updated_switch')

			}else{

				var app_new_Version = localStorage.getItem('Android_Updated_version')
				var app_new_Version_content = localStorage.getItem('Android_Updated_content')
				var app_new_Version_url = localStorage.getItem('app_android_apk_down')
				var app_new_Version_switch = localStorage.getItem('Android_Updated_switch')

			}

 if(app_new_Version_switch == 1){
			if(app_new_Version > api.appVersion && app_new_Version_url != ''){

		//	 alert( app_new_Version_content);


  				api.openWin({
				name: 'app_upgrade',
				url: 'widget://html/setup/app_upgrade.html',
				//	delay: 300,


				bounces: false,
				slidBackEnabled: true,
				bgColor: '#fff',
				animation: {
					type: "fade", //动画类型（详见动画类型常量）
					subType: "from_top", //动画子类型（详见动画子类型常量）
				//	duration: 400
				},
				vScrollBarEnabled: false


				});

			}

 }


}


/////////////更新app 方法  checkUpdate   E   ////////////






</script>
